package com.usian.secuirtydemo.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;

/**
 * @author 贾龙飞
 * @create 2022 - 12 - 19 14:36
 */
@Configuration
public class webSecurity extends WebSecurityConfigurerAdapter {
    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http.formLogin()
        .and()
        .authorizeRequests()
        .anyRequest()
        .authenticated();
    }
}
